package com.sy.common.exception;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;
@Getter
public class ValidateException extends RuntimeException{
    Map error;
    public ValidateException(Map error){
        super();
        this.error=error;
    }

    public ValidateException(String field,String msg){
        super();
        this.error=new HashMap();
        this.error.put(field,msg);
    }

    public Map getError(){
        return error;
    }
}
